package top.healthylife.mapper;

import org.apache.ibatis.annotations.*;
import top.healthylife.domain.Role;
import top.healthylife.domain.User;

import java.util.List;
import java.util.Set;

public interface UserMapper {



//    //展示删除状态未0的数据
//    @Select("select id , username ,password,email,birthday,city from user  where isDeleted=0")
//    List<User> findAll();
//
//
//    @Update("update user set ${param2}=#{param3}  where id=#{param1}")
//    void update(int id, String field, String value);
//
//    @Insert("insert into user values(" +
//            "null,#{username},#{password},#{email}" +
//            "#{birthday},#{city},null)")
//    void save(User user);
//
//    @Delete("update user set isDeleted = 1 where id =#{id} ")
//    void delete(int id);

    @Select("select * from t_user where username =#{username}")
    User findByUsername(@Param("username") String username);

    User findRolesByUser(String username);
}
